//
// Created by ray on 2025/4/2.
//
#ifndef LEARNMEDIA_MP3_ENCODER_H
#define LEARNMEDIA_MP3_ENCODER_H
#include <stdio.h>
#include "lame.h"

class Mp3Encoder {
private:
    FILE* pcmFile;
    FILE* mp3File;
    lame_t lameClient;

public:
    Mp3Encoder();
    ~Mp3Encoder();
    int Init(const char* pcmFilePath, const char* mp3FilePath, int sampleRate, int channels, int bitRate);
    void Encode();

    void Destroy();
};
#endif //LEARNMEDIA_MP3_ENCODER_H